package com.xavier.book.spring_book_demo.enums;

public enum ResultCodeEnum {
    UNLOGIN(-1),
    SUCCESS(200),
    FAIL(-2);

    private int code;

    ResultCodeEnum(int code) {
        this.code = code;
    }

    /**
     * 返回枚举对应的数字码，便于序列化为数字
     */
    public int getCode() {
        return code;
    }
}
